package com.text.demmongodb.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @ClassName User
 * @Author By wen
 * @Description
 * @Date 2023/10/30 14:37
 * @Version 1.0
 */
@Document("user")
@Data
public class User {

    @Id
    private String id;
    /** 用户名（用户昵称） */
    @Field
    private String name;

    @Field
    private int age;

}
